<?php
class Maven_ManageCatalogSpr_Model_Setting extends Varien_Object
{
	const STATUS_ENABLED	= 1;
	const STATUS_DISABLED	= 2;
	
	// Folder names where to save downloaded files
	const PRICE_FOLDER		= "SPRPRICE"; 
	const ADDTIONALDATA_FOLDER	= "ADDINFO";
    const SPR_STOCK_FOLDER	= "SPRSTOCK";

	static public function getOptionArray()
	{
		return array(
		self::STATUS_ENABLED    => Mage::helper('managecatalogspr')->__('Enabled'),
		self::STATUS_DISABLED   => Mage::helper('managecatalogspr')->__('Disabled')
		);
	}
	static public function getRootPath($type)
	{
		return Mage::getRoot();
		
	}
	static public function getConfigData($group, $fld)
	{
		return Mage::getStoreConfig('managecatalogspr/'.$group."/".$fld);
	}
	static public function getImportPath($dir)
	{
		if(!is_dir(Mage::getBaseDir('var').DS.'import'.DS.$dir))
    		mkdir(Mage::getBaseDir('var').DS.'import'.DS.$dir, 0777, true);
		return Mage::getBaseDir('var').DS.'import'.DS.$dir.DS;
	}
	static public function getImportUrl($dir)
	{
		return Mage::getBaseUrl().DS.'import'.DS.$dir;
	}
}